﻿@model LetLord.ViewModels.CreatePropertyViewModel

<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Create Residential Property</h3>
</div>
@using (Ajax.BeginForm("CreateProperty", "Landlords", FormMethod.Post,
                        new AjaxOptions
                        {
                            InsertionMode = InsertionMode.Replace,
                            HttpMethod = "POST",
                            UpdateTargetId = "landlord-properties"
                            //OnSuccess = "Modal.onAjaxSuccess"
                            //OnFailure = "Modal.onAjaxFailure"
                        }))
{
    @Html.ValidationSummary()
    @Html.AntiForgeryToken()
    <div class="modal-body">
        @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.Line1)
        @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.Line2)
        @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.TownCity)
        @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.County)
        @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.PostCode)
        @Html.Bootstrap().ControlGroup().DropDownListFor(x => x.PropertyTypeString, new SelectList(Enum.GetValues(typeof(LetLord.Models.PropertyType))))
        @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.SizeSquareMeters)
        @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.NumberOfBedrooms)
        @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.NumberOfBathrooms)
        @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.NumberOfReceptionRooms)
        @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.MonthlyRate)
        @Html.Bootstrap().ControlGroup().TextAreaFor(x => x.Description)
        @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.HasBackGarden)
        @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.HasFrontGarden)
        @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.HasSecureParking)
        @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.IsDisabledFriendly)
    </div>
    <div class="modal-footer">
        <button class="btn btn-inverse" type="submit" id="btn-create-property-save">Save</button>
    </div>
}